3.2.82 \(\int \frac {(a+b \log (c x^n))^p (d+e \log (f x^r))}{x} \, dx\) [182]

Optimal. Leaf size=71 \[ -\frac {e r \left (a+b \log \left (c x^n\right )\right )^{2+p}}{b^2 n^2 (1+p) (2+p)}+\frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)} \]

[Out]

-e*r*(a+b*ln(c*x^n))^(2+p)/b^2/n^2/(1+p)/(2+p)+(a+b*ln(c*x^n))^(1+p)*(d+e*ln(f*x^r))/b/n/(1+p)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2339, 30, 2413, 12} \begin {gather*} \frac {\left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^{p+1}}{b n (p+1)}-\frac {e r \left (a+b \log \left (c x^n\right )\right )^{p+2}}{b^2 n^2 (p+1) (p+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/x,x]

[Out]

-((e*r*(a + b*Log[c*x^n])^(2 + p))/(b^2*n^2*(1 + p)*(2 + p))) + ((a + b*Log[c*x^n])^(1 + p)*(d + e*Log[f*x^r])
)/(b*n*(1 + p))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2413

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right )}{x} \, dx &=\frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-(e r) \int \frac {\left (a+b \log \left (c x^n\right )\right )^{1+p}}{b n (1+p) x} \, dx\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-\frac {(e r) \int \frac {\left (a+b \log \left (c x^n\right )\right )^{1+p}}{x} \, dx}{b n (1+p)}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-\frac {(e r) \text {Subst}\left (\int x^{1+p} \, dx,x,a+b \log \left (c x^n\right )\right )}{b^2 n^2 (1+p)}\\ &=-\frac {e r \left (a+b \log \left (c x^n\right )\right )^{2+p}}{b^2 n^2 (1+p) (2+p)}+\frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 71, normalized size = 1.00 \begin {gather*} \frac {\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (2 b d n+b d n p-a e r-b e r \log \left (c x^n\right )+b e n (2+p) \log \left (f x^r\right )\right )}{b^2 n^2 (1+p) (2+p)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/x,x]

[Out]

((a + b*Log[c*x^n])^(1 + p)*(2*b*d*n + b*d*n*p - a*e*r - b*e*r*Log[c*x^n] + b*e*n*(2 + p)*Log[f*x^r]))/(b^2*n^
2*(1 + p)*(2 + p))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.43, size = 854, normalized size = 12.03

method result size
risch \(\text {Expression too large to display}\) \(854\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r))/x,x,method=_RETURNVERBOSE)

[Out]

-1/2*I*(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)
+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)+1/2*I*(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n
*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*c
sgn(I*f)*csgn(I*f*x^r)^2+1/2*I*(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+cs
gn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*csgn(I*x^r)*csgn(I*f*x^r)^2-1/2*I*(ln(x)*b*n+a+b*
(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/
b/n/(1+p)*e*Pi*csgn(I*f*x^r)^3+(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+cs
gn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*r*ln(x)+(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*
Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*ln(f)+(ln(x)*b*n+
a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1
+p)/b/n/(1+p)*e*(ln(x^r)-r*ln(x))+(ln(x)*b*n+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)
+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*d-1/b^2/n^2/(1+p)*e*r*(ln(x)*b*n+a+b*(ln(c)+ln(x^n)
-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(2+p)/(2+p)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 97, normalized size = 1.37 \begin {gather*} \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{p + 1} e \log \left (f x^{r}\right )}{b n {\left (p + 1\right )}} + \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{p + 1} d}{b n {\left (p + 1\right )}} - \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{p + 2} r e}{b^{2} n^{2} {\left (p + 2\right )} {\left (p + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="maxima")

[Out]

(b*log(c*x^n) + a)^(p + 1)*e*log(f*x^r)/(b*n*(p + 1)) + (b*log(c*x^n) + a)^(p + 1)*d/(b*n*(p + 1)) - (b*log(c*
x^n) + a)^(p + 2)*r*e/(b^2*n^2*(p + 2)*(p + 1))

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 229 vs. \(2 (73) = 146\).
time = 0.36, size = 229, normalized size = 3.23 \begin {gather*} -\frac {{\left (b^{2} r e \log \left (c\right )^{2} - a b d n p - {\left (b^{2} n^{2} p + b^{2} n^{2}\right )} r e \log \left (x\right )^{2} - 2 \, a b d n + a^{2} r e - {\left (b^{2} d n p + 2 \, b^{2} d n - 2 \, a b r e\right )} \log \left (c\right ) - {\left ({\left (b^{2} n p + 2 \, b^{2} n\right )} e \log \left (c\right ) + {\left (a b n p + 2 \, a b n\right )} e\right )} \log \left (f\right ) - {\left (b^{2} n p r e \log \left (c\right ) + b^{2} d n^{2} p + a b n p r e + 2 \, b^{2} d n^{2} + {\left (b^{2} n^{2} p + 2 \, b^{2} n^{2}\right )} e \log \left (f\right )\right )} \log \left (x\right )\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p}}{b^{2} n^{2} p^{2} + 3 \, b^{2} n^{2} p + 2 \, b^{2} n^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="fricas")

[Out]

-(b^2*r*e*log(c)^2 - a*b*d*n*p - (b^2*n^2*p + b^2*n^2)*r*e*log(x)^2 - 2*a*b*d*n + a^2*r*e - (b^2*d*n*p + 2*b^2
*d*n - 2*a*b*r*e)*log(c) - ((b^2*n*p + 2*b^2*n)*e*log(c) + (a*b*n*p + 2*a*b*n)*e)*log(f) - (b^2*n*p*r*e*log(c)
 + b^2*d*n^2*p + a*b*n*p*r*e + 2*b^2*d*n^2 + (b^2*n^2*p + 2*b^2*n^2)*e*log(f))*log(x))*(b*n*log(x) + b*log(c)
+ a)^p/(b^2*n^2*p^2 + 3*b^2*n^2*p + 2*b^2*n^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{p} \left (d + e \log {\left (f x^{r} \right )}\right )}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**p*(d+e*ln(f*x**r))/x,x)

[Out]

Integral((a + b*log(c*x**n))**p*(d + e*log(f*x**r))/x, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs. \(2 (73) = 146\).
time = 5.01, size = 246, normalized size = 3.46 \begin {gather*} \frac {\frac {{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p + 1} e \log \left (f\right )}{p + 1} + \frac {{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p + 1} d}{p + 1} - \frac {{\left ({\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} b p \log \left (c\right ) - {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{2} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} p + {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} a p + 2 \, {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} b \log \left (c\right ) - {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{2} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} + 2 \, {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )} {\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} a\right )} r e}{{\left (p^{2} + 3 \, p + 2\right )} b n}}{b n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="giac")

[Out]

((b*n*log(x) + b*log(c) + a)^(p + 1)*e*log(f)/(p + 1) + (b*n*log(x) + b*log(c) + a)^(p + 1)*d/(p + 1) - ((b*n*
log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*b*p*log(c) - (b*n*log(x) + b*log(c) + a)^2*(b*n*log(x) +
b*log(c) + a)^p*p + (b*n*log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*a*p + 2*(b*n*log(x) + b*log(c) +
 a)*(b*n*log(x) + b*log(c) + a)^p*b*log(c) - (b*n*log(x) + b*log(c) + a)^2*(b*n*log(x) + b*log(c) + a)^p + 2*(
b*n*log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*a)*r*e/((p^2 + 3*p + 2)*b*n))/(b*n)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (d+e\,\ln \left (f\,x^r\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^p}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*log(f*x^r))*(a + b*log(c*x^n))^p)/x,x)

[Out]

int(((d + e*log(f*x^r))*(a + b*log(c*x^n))^p)/x, x)

________________________________________________________________________________________